<?php 
/* @var $order Order */
?>

<a class="btn" href="<?php echo $this->createUrl('/pay/default/order');?>">返回列表</a>
<hr />
<?php
if($order){
	if($order->status!=3){
		echo "未支付成功";
	}else{
		echo "支付成功";
	}
}else{
	echo "订单不存在";
}
echo "<hr />";

$dataProvider = $order->getOrderProductProvider();
$gridView = $this->widget('zii.widgets.grid.CGridView', array(
		'id'=>'product-grid',
		'cssFile'=>false,
		'emptyText'=>'未找到符合条件数据',
		'itemsCssClass'=>'table table-bordered table-hover',
		'dataProvider'=>$dataProvider,
		'summaryText'=>"",
		'columns'=>array(
				array(
					'name'=>'id',
					'footer'=>'总计'		
				),
				array(
					'header'=>'商品图片',
					'type'=>'image',
					'name'=>'product.cover.realUrl'		
				),
				array(
						'name'=>'amount',
						'value'=>'Utils::getCurrencyUnit("USD").$data->amount',
						'footer'=>$order->getFooter($dataProvider, 'amount')
				),
				array(
					'name'=>'num',
					'footer'=>$order->getFooter($dataProvider, 'num')
				),
				array(
					'name'=>'total',
					'footer'=>$order->getFooter($dataProvider, 'total')
				)
			),
));